package pingu.interface_graphique;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.gui.MouseOverArea;

public class MouseOverButton extends MouseOverArea{
	
	
	private Image image;

	public MouseOverButton(GameContainer gc,Image image,int x,int y) {
		super(gc,image, x, y);
		this.image=image;
	}
	
	
	public int getXmouse(){
		Input input = container.getInput();
		int mouseX = input.getMouseX();
		return mouseX-getX();
		
	}
	
	public int getYmouse(){
		Input input = container.getInput();
		int mouseY = input.getMouseY();
		return mouseY-getY();
		
	}
	
	public void render(Graphics g){
		this.render(container, g);
	}
	
	public Image getImage(){
		return image;
	}
	

}
